<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ page import="DBController.*" %>
<%@ page import="java.util.List" %>
<%@page import="java.util.ArrayList"%>
<%
HttpSession hostsession = request.getSession(true);
int roomID = Integer.parseInt(hostsession.getAttribute("roomID").toString());
//int roomID = 4;
System.out.println(roomID);
DBConnector dbConn = DBConnector.getInstance();
DBController.room roomObj = dbConn.getRoom(roomID);
List<DBController.roomPhoto> roomPhotoList= dbConn.getRoomPhoto(roomID);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<div id="roomName"><%=roomObj.getRoomName() %></div>
<div id="roomType"><%=roomObj.getRoomType() %></div>
<div id="roomSize"><%=roomObj.getRoomSize() %></div>
<div id="pricePerDay"><%=roomObj.getPricePerDay() %></div>
<div id="facility1"><%=roomObj.getHasInsideBathroom() %></div>
<div id="facility2"><%=roomObj.getHasInsideTV() %></div>
<div id="facility3"><%=roomObj.getHasInsideAirCondition() %></div>
<div id="facility4"><%=roomObj.getHasInsideFridge() %></div>
<div id="roomPhotos">
	<%for(DBController.roomPhoto roomPhotoObj : roomPhotoList){
	%>
	<img border="0" src="..<%=roomPhotoObj.getPhotoURL() %>" alt="Image" width="101" height="76">
	<%} %>
</div>
</body>
</body>
</html>